<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- Title, description and single image -->
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:composite="http://java.sun.com/jsf/composite">

<!-- INTERFACE -->
<composite:interface>
	<composite:attribute name="items" type="java.util.ArrayList" required="true" />
	<composite:attribute name="isEmpty" type="boolean" required="true" />
	<composite:attribute name="emptyMessage" type="java.lang.String" required="true" />
	<composite:attribute name="isNotEmpty" type="boolean" required="true" />
  	<composite:attribute name="action" method-signature="java.lang.String action(bean.Locale)" required="true" />
</composite:interface>

<!-- IMPLEMENTATION -->
<composite:implementation>
	<h:form>
		<ul id="elenco_locali_button">
			<h:outputStylesheet name="elenco_locali.css" library="pages/items" />
			<h:outputText rendered="isEmpty"
				value="emptyMessage" />
			<h:dataTable value="items" var="l"
				rendered="isNotEmpty">

				<h:column>
					<li id="elenco_locali_button_active"><h:commandLink
							action="action" rendered="#{l.isSelected()}">
							<h:outputText value="- #{l.name}" />
						</h:commandLink>
					</li>
					<li id="elenco_locali_button"><h:commandLink
							action="action" rendered="#{l.isNotSelected()}">
							<h:outputText value="+ #{l.name}" />
						</h:commandLink>
					</li>
				</h:column>
			</h:dataTable>
		</ul>
	</h:form>
</composite:implementation>
</html>